import socket
from DesModule import des_descrypt,des_encrypt
tcpclient = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
tcpclient.connect(("172.16.208.90", 2025))
while True:
    while True:
        data = input('>>>').strip()  # 显示提示符 >>> 等待用户输入并去除首尾的空白字符。
        ciphertext = des_encrypt(data, "12345678")
        tcpclient.send(ciphertext.encode('utf-8'))
        ret = tcpclient.recv(1024)
        plaintext = des_descrypt(ret.decode('utf-8'), "12345678")
        print(plaintext)
tcpclient.close()